package cj.web.portal.dao;
/*
 *  
 *  
*/
import java.util.List;
import java.util.Map;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.ReturnGeneratedKeys;
import net.paoding.rose.jade.annotation.SQL;

/**
 * 
 * @author 
 *
 */
@DAO
public interface VideoOrderVoDAO{
	
	@SQL("SELECT * FROM VideoOrder WHERE orderNo=:1")
    List<Map> queryByOrderNo(String orderNo);
	
    @SQL("SELECT * FROM VideoOrder WHERE id=:1")
    List<Map> queryById(int id);
    
	@SQL("UPDATE VideoOrder SET orderNo=:t.orderNo,memberId=:t.memberId,price=:t.price,status=:t.status,payWay=:t.payWay,payOrder=:t.payOrder,source=:t.source,updateAt=now(),updateUser=:t.updateUser WHERE id=:t.id")
    void updateStatusByNO(int status,String orderNo,String payOrder,int payWay);
    
    @SQL("UPDATE VideoOrder SET deleteFlag=0 WHERE id=:1")
    void deleteById(int id);
	
    @ReturnGeneratedKeys
    @SQL("INSERT INTO VideoOrder (id,orderNo,memberId,price,status,deleteFlag,createAt,createUser,updateAt,updateUser) VALUES (:1,:2,:3,:4,:5,1,now(),:6,now(),:7) ")
    int create(int id,String orderNo,int memberId,String price,int status,String createUser,String updateUser);
}